New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial sys_config implementation #5781
Conversation
0be9a65
to
0f4361f
Compare
23332e0
to
1825dff
Compare
rpcs3/Emu/Cell/lv2/sys_config.h
Outdated
SYS_CONFIG_SERVICE_0x20 = 0x20, | ||
SYS_CONFIG_SERVICE_0x30 = 0x30, | ||
|
||
SYS_CONFIG_SERVICE_USER_BASE = static_cast<s64>(0x8000'0000'0000'0000llu), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use INT64_C macro. (int64 constant)
SYS_CONFIG_SERVICE_USER_BASE = static_cast<s64>(0x8000'0000'0000'0000llu), | |
SYS_CONFIG_SERVICE_USER_BASE = INT64_C(0x8000'0000'0000'0000), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs the static_cast
. I've replaced the llu
with UINT64_C
, though.
I've rebased this, and went through the remaining reviews. |
This PR contains a mostly-complete implementation of the sys_config syscalls, which is one of the many things required for RPCS3 to be able to boot vsh standalone. In particular, without sys_config, vsh believes no controllers are connected, and as such does not recognize any input.
Below I have copied in an explanation of how sys_config works (also included at the top of sys_config.h):
vsh uses sys_config as a way to permanently store system settings and hardware configuration, e.g. how many controllers are connected.
This PR implements all the service event functionality except for the listener filtering by buffer, as that piece of the code is extremely difficult to reverse engineer. In addition, as I have never seen vsh use it, I also only stub the IO error related syscalls, however I believe their implementation is extremely similar to the rest of sys_config.
In addition, once sys_config is initialized the first time it will enqueue the LV2 Padmanager event that tells vsh that a controller is connected. The contents of this event's buffer are also not fully understood as of this moment. The current implementation of sys_config is flexible enough that it should be straightforward to implement further LV2 services as soon as they are understood.
PS: I do not believe this PR affects any game. It is extremely vsh-specific.